<%@ page language="java" contentType="text/html; charset=utf-8" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<%
    JSONObject jsonData = new JSONObject();
    String docid = Util.null2String(request.getParameter("docid"));
    String sql = "select count(id) from view_custom_newdoc where id=?";
    rs.executeQuery(sql, docid);
    rs.next();
    int count = Util.getIntValue(rs.getString(1));
    jsonData.put("flag", count > 0);
    out.print(jsonData.toJSONString());
%>
